import { ResponseData } from '../type.ts';

// 用户信息
export interface UserInfo {
  id?: number;
  createTime?: string;
  updateTime?: string;
  username: string;
  password: string;
  name: string;
  phone?: number | null;
  roleName?: string;
}
export interface UserInfoResData extends ResponseData {
  data: UserInfo;
}
// 用户列表
interface UserList {
  records: UserInfo[];
  total: number;
  size: number;
  current: number;
  orders: any[];
  optimizeCountSql: boolean;
  hitCount: boolean;
  countId: null;
  maxLimit: null;
  searchCount: boolean;
  pages: number;
}
export interface UserListResData extends ResponseData {
  data: UserList;
}
// 角色类型
export interface Role {
  id: number;
  roleName: string;
  remark?: string;
  createTime?: string;
  updateTime?: string;
}
interface UserRolesList {
  assignRoles: Role[];
  allRolesList: Role[];
}
export interface UserRolesListResData extends ResponseData {
  data: UserRolesList;
}
// 分配角色请求参数类型
export interface AssignRolesReqData {
  userId: number;
  roleIdList: number[];
}
